﻿<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
    <h1 class="h3">任务管理</h1>
    <div class="btn-toolbar mb-2 mb-md-0" style="display: flow-root;">
            <div class="pretty p-switch p-fill">
                    <input type="checkbox" id="cbAutoRefresh" />
                    <div class="state"><label>自动刷新</label>
                    </div>
                </div>
        <div class="btn-group" id="btnGroup" >
          </div>
    </div>
</div>

<input type="hidden" id="taskId" />
<div class="mb-2 collapse" id="editRunParam">
        <form class="bv-form">
                <!-- <div class="form-group">
                        <label for="taskName">任务名</label>
                        <input type="text"  name="taskName" class="form-control" id="taskName" value="" readonly >
                    </div>

                    <div class="form-group">
                            <label for="taskTypeName">类名</label>
                            <input type="text"  name="taskTypeName" class="form-control" id="taskTypeName" value="" readonly >
                    </div> -->

                    <div class="form-group">
                            <label for="timeType">循环方式</label>
                            <select class="form-control" id="timeType">
                              <option value="0">不循环</option>
                              <option value="1">分钟循环</option>
                              <option value="2">小时循环</option>
                              <option value="3">天循环</option>
                              <option value="4">月循环</option>
                              <option value="5">秒循环</option>
                            </select>
                          </div>
            <div class="form-group">
                <label for="interval">间隔</label>
                <input type="number"  name="interval" class="form-control" id="interval" value="0" >
            </div>

            <div class="form-group">
                    <label for="startTime" class="control-label">开始时间</label>
                    <div class="input-group date form_datetime" data-date-format="yyyy-mm-dd hh:ii">
                        <input class="form-control" type="text" id="startTime"  readonly>
                        <span class="input-group-addon" style="width: 40px;"><span class="glyphicon glyphicon-remove"></span></span>
                        <span class="input-group-addon" style="width: 40px;"><span class="glyphicon glyphicon-time"></span></span>
                    </div>
                    <!-- <input type="hidden" id="startTime"  /> -->
                </div>

            <div class="form-group">
                    <div class="pretty p-switch p-fill">
                            <input type="checkbox"  id="runOnStart"/>
                            <div class="state p-primary"><label>启动时立即执行一次</label>
                            </div>
                        </div>
        </div>
    
            <button type="button"  class="btn btn-primary mr-2" onclick="Task.saveRunParam()">保存</button>
            <button type="button"  class="btn btn-outline-secondary" onclick='$("#editRunParam").collapse("hide");'>取消</button>
        </form>
    </div>

    <div class="mb-2 collapse" id="editConfig">
            <form class="bv-form">
                <div id="taskConfig">

                </div>
                    <button type="button" id="btnSaveConfig"  class="btn btn-primary mr-2" onclick="Task.saveConfig()">保存</button>
                    <button type="button"  class="btn btn-outline-secondary" onclick='$("#editConfig").collapse("hide");'>取消</button>
              
            </form>
        </div>

<div class="table-responsive-md">

    <table class="table table-striped table-expandable" style="min-width: 1100px;">
        <thead>
            <tr>

                <th style="width:50px;">Id</th>
                <th style="width:50px;">程序集Id</th>
                <th>任务名</th>
                <th>类名</th>
                <th>状态</th>
                <th>下次运行时间</th>
                <th>循环方式</th>
                <th>间隔时间</th>
                <th>启动时立即执行</th>
                <th>开始时间</th>
                <th id="thOperate">操作</th>
            </tr>
        </thead>
        <tbody id="tb_body">
        
        </tbody>
    </table>
</div>